﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <title>流程节点配置</title>
    <link href="~/Content/layui/css/layui.css" rel="stylesheet" />
    <link href="~/Content/smartflow.css" rel="stylesheet" />
    <script src="~/Content/jquery.min.js"></script>
    <script src="~/Content/utils.js"></script>
    <script src="~/Content/settings.js"></script>
    <script type="text/javascript">
        $(function () {
            SMF.init({
                configUrl: '@Url.Action("GetConfigs", "WorkflowDesign")',
                roleUrl: '@Url.Action("GetRole", "WorkflowDesign")'
            });

            $("#btnSearch").click(function () {
                var searchKey = $.trim($(".smartflow-search-input").val());
                SMF.search(searchKey || '');
            });
        });
    </script>
</head>
<body>
    <div class="layui-container">
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title" id="tab">
                <li category="info" class="layui-this">基本信息</li>
                <li category="role">参与角色</li>
                <li category="rule">规则配置</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <table class="layui-table" lay-skin="nob">
                        <tr>
                            <td style="width:60px;" class="layui-text">名称</td>
                            <td>
                                <input type="text" id="txtNodeName" class="layui-input smartflow-input" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <div class="smartflow-role-box">
                                <div style="padding-bottom:5px;position:relative;">
                                    <input type="text" placeholder="按角色名称搜索" class="layui-input smartflow-input smartflow-search-input" />
                                    <span class="layui-icon layui-icon-search smartflow-search-icon" id="btnSearch"></span>
                                </div>
                                <div class="smartflow-role-list">
                                    <ul id="roleGrid" class="smartflow-list"></ul>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <fieldset class="layui-elem-field layui-elem-field-h" style="margin-left:10px;">
                                <legend>已选角色</legend>
                                <div class="layui-field-box">
                                    <ul id="roleAssign" class="smartflow-list"></ul>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <fieldset class="layui-elem-field layui-field-title layui-field-title-mp">
                        <legend>SQL脚本</legend>
                    </fieldset>
                    <table class="layui-table smartflow-table-tb" lay-skin="nob">
                        <tbody>
                            <tr>
                                <td style="width:120px;" class="layui-text">
                                    数据源
                                </td>
                                <td>
                                    <select id="ddlRuleConfig" class="layui-select smartflow-input" style="width:100%;"></select>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:120px;" class="layui-text">SQL脚本</td>
                                <td>
                                    <input id="txtCommand" class="layui-input smartflow-input" spellcheck="false" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <fieldset class="layui-elem-field  layui-field-title layui-field-title-mp">
                        <legend>表达式配置</legend>
                    </fieldset>
                    <div style="height:200px;overflow: auto;">
                        <table class="layui-table smartflow-table-tb" id="transitions" lay-skin="nob">
                            <tbody></tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="~/Content/layui/layui.js"></script>
    <script type="text/javascript">
        //注意：选项卡 依赖 element 模块，否则无法进行功能性操作
        layui.use(['element', 'form'], function () {
        });
    </script>
</body>
</html>
